pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let digits = "0123456789abcdefghijklmnopqrstuvwxwz";
    let left = num_str.find('(').unwrap();
    let right = num_str.find(')').unwrap();
    let num = &num_str[..left];
    let ryon = &num_str[(left + 1)..(right)];
    let ryon = ryon.parse::<u32>().unwrap();
    let mut num = u32::from_str_radix(num, ryon).unwrap();

    let mut result = String::new();

    while num > 0 {
        let remainder = (num % to_base) as usize;
        result.push(digits.chars().nth(remainder).unwrap());
        num /= to_base;
    }

    if result.is_empty() {
        result.push('0');
    }

    result.chars().rev().collect()
}
